#ifndef _Graph
#define _Graph

#include "queue.c"

typedef int Vertex;
struct Node;

typedef struct Node *PtrToNode, *List;  
struct Node {  
  Vertex    adjvex; 
  PtrToNode next;  
};

struct VertexRecord{ 
  ElementType  Element;   
  List  adjto; 
};
struct GraphRecord{  
  int      vexnum; 
  struct VertexRecord *vertices;
};
typedef struct GraphRecord *Graph;

Graph CreateUndirectGraph(void);
void Shortest(Graph G, int S, int LAST[]);
void DestroyGraph(Graph G);
int NumOfVex(Graph G);
Vertex FirstAdjVex(Graph G, Vertex v); 
Vertex NextAdjVex(Graph G, Vertex v, Vertex w); 
#endif  // _Graph